package com.ht.medicaltreatment.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ht.medicaltreatment.R
import com.ht.medicaltreatment.base.BaseUrl
import com.ht.medicaltreatment.utils.loadImage

class SubjectRightAdapter : BaseQuickAdapter<String,BaseViewHolder>(R.layout.item_subject_right_layout){

    private var url = ""

    init {
        addChildClickViewIds(R.id.tvAdd)
    }

    fun setUrl(url:String){
        this.url = BaseUrl.baseUrl()+url
    }

    override fun convert(holder: BaseViewHolder, item: String) {
        holder.setText(R.id.tvName,item)
        holder.loadImage(R.id.imgIcon,url)
    }
}
